import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { knowledge, system, aiqa } from '@/api/apiModulesType';
// 查询用户标签
export const ApiPerfilesUserLabel = function (params?: any) {
  return request({
    method: 'get',
    url: `/${knowledge}/filesUserLabel/queryTeam`,
    params: params
  });
};

// 新增用户标签
export const ApiPerLabelCreate = function (data?: any) {
  return request({
    method: 'post',
    url: `/${knowledge}/filesUserLabel/createTeam`,
    data: data
  });
};

// 修改用户标签
export const ApiPerLabelupdate = function (data?: any) {
  return request({
    method: 'post',
    url: `/${knowledge}/filesUserLabel/update`,
    data: data
  });
};

// 删除用户标签
export const ApiPerLabeldelete = function (data?: any) {
  return request({
    method: 'post',
    url: `/${knowledge}/filesUserLabel/v2/delete`,
    data: data
  });
};

// 查询标签记录已添加的文件
export const ApiPerQuerySelect = function (params?: any) {
  return request({
    method: 'get',
    url: `/${knowledge}/api/filesLabelRecord/querySelect`,
    params: params
  });
};
//我的标签--双击获取文件信息
export const ApiPerfilesLabelRecord = function (params?: any) {
  return request({
    method: 'get',
    url: `/${knowledge}/api/filesLabelRecord/query`,
    params: params
  });
};
// 跳转目录树
export const ApiPerGetParentTreeNodeAll = function (params?: any) {
  return request({
    method: 'get',
    url: `/${knowledge}/api/unifiedCollection/getParentTreeNodeAll`,
    params: params
  });
};
// 删除标签下的文件
export const ApiPerFileDelete = function (data?: any) {
  return request({
    method: 'post',
    url: `/${knowledge}/api/filesLabelRecord/delete`,
    data: data
  });
};
// 我的标签删除标签里面的文件记录
export function apiFilesLabelRecordDelete(data) {
  return request({
    url: `${knowledge}/filesLabelRecord/delete`,
    method: "post",
    data
  });
}
// 删除标签
export function apiFilesUserLabelDel(data) {
  return request({
    url: `${knowledge}/filesUserLabel/deleteTeam`,
    method: "post",
    data
  });
}
